package com.amt.olcacon.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("`contribution_tree`")
public class ContributionTree {

    private Long id;
    private Date created_time;
    private String created_by;
    /**
     * 填报任务核算结果
     */
    private Long calculation_result;
    /**
     * 核算标准种类
     */
    private Long impact_category;
    /**
     * 输入输出项
     */
    private String flow_name;
    /**
     * 上游名称
     */
    private String provider;
    /**
     * 输入输出id
     */
    private Long flow_id;
    /**
     * 输入输出RefId
     */
    private String flow_ref_id;
    /**
     * 输入输出类型
     */
    private String flow_type;
    /**
     * 输入输出property
     */
    private Long flow_property_id;
    /**
     * 排序
     */
    private Integer index;
    /**
     * 总结果
     */
    private BigDecimal result;
    /**
     * 直接贡献
     */
    private BigDecimal direct;
    /**
     * 总数量
     */
    private BigDecimal required_amount;
    /**
     * 比例
     */
    private BigDecimal scaling;
    /**
     * 父Id
     */
    private Long parent_id;
    /**
     * 是否拥有子级
     */
    private Boolean has_childs;
    /**
     * 核算标准种类名称
     */
    private String impactCategoryName;

    /**
     * 节点类型
     * <p>
     * PROCESS
     * FLOW
     * UNKOWN
     * </p>
     */
    @TableField("node_type")
    private String nodeType;


//    public ContributionTree(Long id, Date created_time, String created_by, Long calculation_result, Long impact_category, String flow_name, String provider, String flow_id, String flow_ref_id, String flow_type, Long flow_property_id, Integer index, BigDecimal result, BigDecimal direct, BigDecimal required_amount, BigDecimal scaling, Long parent_id, Boolean has_childs) {
//        this.id = id;
//        this.created_time = created_time;
//        this.created_by = created_by;
//        this.calculation_result = calculation_result;
//        this.impact_category = impact_category;
//        this.flow_name = flow_name;
//        this.provider = provider;
//        this.flow_id = flow_id;
//        this.flow_ref_id = flow_ref_id;
//        this.flow_type = flow_type;
//        this.flow_property_id = flow_property_id;
//        this.index = index;
//        this.result = result;
//        this.direct = direct;
//        this.required_amount = required_amount;
//        this.scaling = scaling;
//        this.parent_id = parent_id;
//        this.has_childs = has_childs;
//    }
}
